package edu.xlh.travel.controller.user;

import edu.xlh.travel.common.Result;
import edu.xlh.travel.pojo.Comment;
import edu.xlh.travel.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/fore_comment")
public class ForeCommentController {
    @Autowired
    private CommentService commentService;

    @RequestMapping("/comment")
    @ResponseBody
    public Result comment (@RequestBody Comment comment , HttpSession session) {
        return commentService.comment(comment , session);
    }
}
